package com.studylazy.phprpc.examples;

import com.studylazy.phprpc.annotation.PHPRPC;

/**
 * Easy and quick start a PHPRPC server using java annotation
 * 
 * 
 * @param urlPattern example: http://[host][contextPath][urlPattern]
 * @param add[] same as PHPRPC_server.add register publish method name  
 * 
 * @author Abola Lee <abola@study-lazy.com>
 * @see http://www.study-lazy.com/2012/10/phprpc-in-java-annotation.html
 */
@PHPRPC(urlPattern = "/PhprpcAddMethodExample.phprpc", add={"get","set"} )
public class PhprpcAddMethodExample {

	public String get(){
		return "Hello";
	}
	
	public static String set(String msg){
		return msg;
	}
	
	public String noneAdd(){
		// client got NoSuchMethodException
		return "none add method";
	}
}
